package io.renren.modules.yckj.service;

import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.modules.yckj.dto.InvoiceLogsDTO;
import io.renren.modules.yckj.entity.InvoiceLogsEntity;

import java.util.Map;

/**
 * 发票日志
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2025-05-20
 */
public interface InvoiceLogsService extends CrudService<InvoiceLogsEntity, InvoiceLogsDTO> {

    /**
     * @param params params
     * @return PageData<InvoiceLogsDTO>
     */
    PageData<InvoiceLogsDTO> pageForApi(Map<String, Object> params);

    /**
     * @param userId       userId
     * @param businessId   businessId
     * @param businessType businessType
     * @return 实体
     */
    InvoiceLogsEntity getByUserIdBusiness(Long userId, Long businessId, Integer businessType);

    /**
     * 仅微信支付时 处理订单完成
     *
     * @param userId       用户id
     * @param businessId   业务id
     * @param businessType 业务类型
     * @return 实体
     */
    Result handleOrderFinishedByAdmin(Long userId, Long businessId, Integer businessType) throws Exception;

    /**
     * @param outTradeNo    outTradeNo
     * @param transactionId transactionId
     * @param payData       payData
     * @return true 成功 false 失败
     * @throws Exception Exception
     */
    boolean handleNotify(String outTradeNo, String transactionId, String payData) throws Exception;


}